<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>Ruby on Rails - Rails Migrations Cheatsheet - Dizzy</title>
	
	<link href="/stylesheets/main.css?1231895299" media="all" rel="stylesheet" type="text/css" />
	<link href="/stylesheets/syntax_highlighting.css?1230303584" media="all" rel="stylesheet" type="text/css" />
	
	<script src="/javascripts/prototype.js?1220877731" type="text/javascript"></script>
<script src="/javascripts/effects.js?1220877731" type="text/javascript"></script>
<script src="/javascripts/dragdrop.js?1220877731" type="text/javascript"></script>
<script src="/javascripts/controls.js?1220877731" type="text/javascript"></script>
<script src="/javascripts/application.js?1201129168" type="text/javascript"></script>
	
</head>

<body>	

	<div id="page_container">
		
		<div id="top_container">
	
	<div id="logo"><img alt="Dizzy logo" height="84" src="/images/f/branding/header/logo.png.?1201129165" width="85" /></div>
	
	<div id="right_of_logo">
		<img alt="Making business beautiful" height="32" src="/images/f/branding/header/slogan_new.png.?1201129165" width="182" />	
		<img alt="Makeover" src="/images/f/branding/header/0.png.?1201129165" />	
	</div>
	
</div>
		<div id="navigation">
	
<!-- HOME -->
	<div class="nav_button">
		
			<a href="/"><img alt="Home" src="/images/f/nav/home.png.?1231929764" /></a> <a href="/">Home</a>
		
	</div>

<!-- CHEATSHEETS -->
	<div class="nav_button">
		
			<a href="/ruby_on_rails/cheatsheets"><img alt="Cheats" src="/images/f/nav/cheats.png.?1231929839" /></a> <a href="/ruby_on_rails/cheatsheets">Cheatsheets</a>
		
	</div>	
	
<!-- RUBY ON RAILS -->
	<div class="nav_button">
		
		<a href="/ruby_on_rails/latest"><img alt="Rails_over" src="/images/f/nav/rails_over.png.?1231931371" /></a> <b>Ruby on Rails</b>
		
	</div>
	
<!-- PORTFOLIO -->
	<div class="nav_button">
		
			<a href="/portfolios"><img alt="Portfolio" src="/images/f/nav/portfolio.png.?1231929695" /></a> <a href="/portfolios">Portfolio</a>
		
	</div>
	
<!-- CONTACT -->
	<div id="contact_icon" class="nav_button">
		<a before="Element.show('contact_spinner')" complete="Element.hide('contact_spinner')" href="#" onclick="try {
$(&quot;contact_form&quot;).show();
} catch (e) { alert('RJS error:\n\n' + e.toString()); alert('$(\&quot;contact_form\&quot;).show();'); throw e }; return false;"><img alt="Contact" src="/images/f/nav/contact.png.?1231929853" /></a> 
	<a before="Element.show('contact_spinner')" complete="Element.hide('contact_spinner')" href="#" onclick="try {
$(&quot;contact_form&quot;).show();
} catch (e) { alert('RJS error:\n\n' + e.toString()); alert('$(\&quot;contact_form\&quot;).show();'); throw e }; return false;">Contact</a>
		<div id="contact_spinner" style="display:none;"><img alt="Spinner" src="/images/f/spinner.gif" /></div>
	</div>

</div>

<div id="contact_form" style="display:none;"></div>

		
		<div id="contact_form" style="display:none;"></div>
		
		<div id="content_container">
			<div id="breadcrumbs"><p><img alt="You are here:" height="24" src="/images/f/small_icons/you-are-here.gif.?1201129163" width="25" /> <a href="/">Home</a> <img alt="Solidarrow" src="/images/f/bullets/arrows/solidarrow.png.?1201129166" /> <a href="/ruby_on_rails/latest">Ruby on Rails</a> <img alt="Solidarrow" src="/images/f/bullets/arrows/solidarrow.png.?1201129166" /> <b></b></p></div>
				
<div id="left_column">
	
	<ul id="category_list" class="categories"><li id="category_31"><a href="/ruby_on_rails/categories/action-mailer">Action Mailer</a></li><li id="category_18"><a href="/ruby_on_rails/cheatsheets">Cheatsheets</a></li><li id="category_26"><a href="/ruby_on_rails/categories/file-handling">File Handling</a></li><li id="category_27"><a href="/ruby_on_rails/categories/helpers">Helpers</a></li><li id="category_34"><a href="/ruby_on_rails/categories/migrations">Migrations</a></li><li id="category_7"><a href="/ruby_on_rails/categories/models">Models</a></li><li id="category_29"><a href="/ruby_on_rails/categories/regular-expressions">Regular Expressions</a></li><li id="category_33"><a href="/ruby_on_rails/categories/relationships">Relationships</a></li><li id="category_35"><a href="/ruby_on_rails/categories/rjs">RJS</a></li><li id="category_11"><a href="/ruby_on_rails/categories/routing-and-urls">Routing and URLs</a></li><li id="category_32"><a href="/ruby_on_rails/categories/validations">Validations</a></li></ul>
	
	
	
	
		
			<p><div class="spiro"> &nbsp;</div></p>
			<div id="blurb">
				<h4><img alt="&gt;" height="9" src="/images/f/bullets/arrows/solidarrow.png.?1201129166" width="13" /> RELATED ARTICLE</h4>
				<h2><img alt="*" height="13" src="/images/f/bullets/pixels/asterisk.png.?1201129166" width="13" /> New in Rails 2.0: Sexy Migrations</h2> 
				<p>A look at the new features and syntax available in migrations on Rails 2.0 <img alt="&gt;" height="9" src="/images/f/bullets/arrows/solidarrow.png.?1201129166" width="13" /> <a href="/ruby_on_rails/contents/rails-2-sexy-migrations">More</a> </p>
			</div>
		
			<p><div class="spiro"> &nbsp;</div></p>
			<div id="blurb">
				<h4><img alt="&gt;" height="9" src="/images/f/bullets/arrows/solidarrow.png.?1201129166" width="13" /> RELATED ARTICLE</h4>
				<h2><img alt="*" height="13" src="/images/f/bullets/pixels/asterisk.png.?1201129166" width="13" /> Auto migrations</h2> 
				<p>A brilliant plugin that makes changing your database schema even easier and faster. <img alt="&gt;" height="9" src="/images/f/bullets/arrows/solidarrow.png.?1201129166" width="13" /> <a href="/ruby_on_rails/contents/auto-migrations">More</a> </p>
			</div>
		
				
				
</div>
			
<div id="right_column">
	
			




<h1>Rails Migrations Cheatsheet</h1>

<h2>Up and down methods, rake tasks, column mapping, loading fixtures, example migration file, all packed onto one A4 page for an easy at-a-glance reference. Updated for Rails 2.1</h2>

<div class="spiro"> &nbsp;</div>

<div id="article"><h1 id='table_of_contents'>Table of Contents</h1>
<div class='maruku_toc'><ul style='list-style: none;'><li><span class='maruku_section_number'>1. </span><a href='#table_methods'>Table methods</a><ul style='list-style: none;'><li><span class='maruku_section_number'>1.1. </span><a href='#change_table'>change_table</a></li><li><span class='maruku_section_number'>1.2. </span><a href='#create_table'>create_table</a><ul style='list-style: none;'><li><span class='maruku_section_number'>1.2.1. </span><a href='#table_options'>table_options</a></li></ul></li><li><span class='maruku_section_number'>1.3. </span><a href='#drop_table'>drop_table</a></li><li><span class='maruku_section_number'>1.4. </span><a href='#rename_table'>rename_table</a></li></ul></li><li><span class='maruku_section_number'>2. </span><a href='#example_migrationrb'>example_migration.rb</a></li><li><span class='maruku_section_number'>3. </span><a href='#database_mapping'>Database Mapping</a></li><li><span class='maruku_section_number'>4. </span><a href='#rake_tasks'>Rake tasks</a></li><li><span class='maruku_section_number'>5. </span><a href='#directory_structure'>Directory structure</a></li><li><span class='maruku_section_number'>6. </span><a href='#shortcut_methods'>Shortcut methods</a></li><li><span class='maruku_section_number'>7. </span><a href='#column_methods'>Column methods</a><ul style='list-style: none;'><li><span class='maruku_section_number'>7.1. </span><a href='#add_column'>add_column</a><ul style='list-style: none;'><li><span class='maruku_section_number'>7.1.1. </span><a href='#add_column_options'>column_options</a></li></ul></li><li><span class='maruku_section_number'>7.2. </span><a href='#change_column'>change_column</a></li><li><span class='maruku_section_number'>7.3. </span><a href='#rename_column'>rename_column</a></li><li><span class='maruku_section_number'>7.4. </span><a href='#remove_column'>remove_column</a></li></ul></li><li><span class='maruku_section_number'>8. </span><a href='#indexes'>Indexes</a><ul style='list-style: none;'><li><span class='maruku_section_number'>8.1. </span><a href='#add_index'>add_index</a></li><li><span class='maruku_section_number'>8.2. </span><a href='#remove_index'>remove_index</a></li></ul></li><li><span class='maruku_section_number'>9. </span><a href='#miscellaneous_methods'>Miscellaneous methods</a><ul style='list-style: none;'><li><span class='maruku_section_number'>9.1. </span><a href='#execute'>execute</a></li><li><span class='maruku_section_number'>9.2. </span><a href='#irreversiblemigration'>IrreversibleMigration</a></li></ul></li><li><span class='maruku_section_number'>10. </span><a href='#scriptgenerate'>script/generate</a></li><li><span class='maruku_section_number'>11. </span><a href='#loading_fixtures'>Loading fixtures</a><ul style='list-style: none;'><li><span class='maruku_section_number'>11.1. </span><a href='#customersyml'>customers.yml</a></li><li><span class='maruku_section_number'>11.2. </span><a href='#migrationrb'>migration.rb</a></li></ul></li></ul></div>
<h2 id='table_methods'><span class='maruku_section_number'>1. </span>Table methods</h2>

<h3 id='change_table'><span class='maruku_section_number'>1.1. </span>change_table</h3>

<p>Provides a block that enables you to alter columns on an existing table using various shortcut methods&#8230;</p>

</div>

<div id="comments">

	<h1>Comments</h1>
	
	
<div class="root_comment" id="comment_39"><h6>fomaiv</h6><p>What if need update a image ??</p><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/39/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></p></div>

<div class="root_comment" id="comment_38"><div class="comments_container"><div class="comments_left"><p><span class="posted_ago">2 MONTHS AGO</span><br/> <span class="email">Gabe Odess</span></p></div><div class="comments_right"><h6>No Method 'image_file'</h6><p>When I tried to upload my image I got an error saying:

     undefined method `image_file=' for #<Photo:0x2508aa0>

I ended up changing the 'create' method from @photo = Photo.new(params[:photo]) to:

    @photo = Photo.new
    @photo.image_file(params[:photo]["image_file"])

and that worked fine, but do you have any idea why I would be getting that error message?  It seems like I'm missing some elegant feature, which is causing me to have to do this in two steps... thoughts?</p></div><div class="reply_comment" id="reply_38"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/38/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_38"></p></div></div></div>

<div class="root_comment" id="comment_37"><div class="comments_left"><p><span class="posted_ago">2 MONTHS AGO</span><br/> <span class="email">Adam</span></p></div><div class="comments_right"><h6>Mp3 Implementation</h6><p>How much would this change to use mp3's instead of pictures?  Would the mp3 files be pulled from the database the same way?  Thanks and great website.  Very helpful to the RoR newbie

-Adam</p></div><div class="reply_comment" id="reply_37"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/37/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_37"></p></div></div>

<div class="root_comment" id="comment_36"><div class="comments_left"><p><span class="posted_ago">2 MONTHS AGO</span><br/> <span class="email">Carl</span></p></div><div class="comments_right"><h6>Works with 2.1.1</h6><p>I recently needed to do this for a pretty static site and didn't really want to use attachment_fu this time, so I used this as a guideline to see if I could do it. Based on previous comments I wasn't sure what the problems would be, but I had minimal problems, and they were all do to simple copy/paste errors (since I'm not doing quite the same thing). I have models, lets call them Animals, and they has_many photos (with photos being set up basically as above). Photos belongs_to Animals. Photo.rb has the def image_file=(input_data)
 code from above. In my animals controller I did add @photo = Photo.new(params[:photo])
 in the create action, and @photo = Photo.new in the new action (I used it for the fields_for in the view) and then I created a photos controller with the code_view code for displaying the image inline from the tutorial. It all worked perfectly.</p></div><div class="reply_comment" id="reply_36"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/36/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_36"></p></div></div>

<div class="root_comment" id="comment_31"><div class="comments_left"><p><span class="posted_ago">4 MONTHS AGO</span><br/> <span class="email">observer</span></p></div><div class="comments_right"><h6>Rails Version</h6><p>It would probably be useful to mention the version of Rails with which this code has been successfully tested.</p></div><div class="reply_comment" id="reply_31"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/31/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_31"></p></div></div>

<div class="root_comment" id="comment_27"><div class="comments_left"><p><span class="posted_ago">5 MONTHS AGO</span><br/> <span class="email">sgk</span></p></div><div class="comments_right"><h6>this failed for me until...</h6><p>I am now bald and lost about 20 pounds....
but when I finally added "has_many :image_files" to the class declaration in app/models/photo.rb, I can now load am image properly into the db.
</p></div><div class="reply_comment" id="reply_27"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/27/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_27"></p></div></div>

<div class="root_comment" id="comment_26"><div class="comments_left"><p><span class="posted_ago">5 MONTHS AGO</span><br/> <span class="email">Sarah Lewis</span></p></div><div class="comments_right"><h6>Thanks for this resource!</h6><p>This tutorial was exactly what I needed to get me started. My application needed attachments, and this helped me figure out the file upload portion. From there, it wasn't too hard to figure out how to associate the files with my other records, and I'm in business.

Your step-by-step directions made this much easier than fiddling with one of the attachment plugins (and I'm speaking from frustrating experience here! :) ).</p></div><div class="reply_comment" id="reply_26"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/26/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_26"></p></div></div>

<div class="root_comment" id="comment_23"><div class="comments_left"><p><span class="posted_ago">5 MONTHS AGO</span><br/> <span class="email">aj illescas</span></p></div><div class="comments_right"><h6>rails2.0</h6><p>the image odes nit appear, instead a description, content type, filename and time of creation appears... could you help me with this one</p></div><div class="reply_comment" id="reply_23"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/23/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_23"></p></div></div>



<div class="root_comment" id="comment_21"><div class="comments_left"><p><span class="posted_ago">6 MONTHS AGO</span><br/> <span class="email">Nicholas Mercer</span></p></div><div class="comments_right"><h6>Rails 2.0</h6><p>Any ideas on how to fix the following?

DEPRECATION WARNING: paginate is deprecated and will be removed from Rails 2.0 (Pagination is moving to a plugin in Rails 2.0: script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination)  See http://www.rubyonrails.org/deprecation for details. (called from list at /rails/gtown/app/controllers/photo_admin_controller.rb:12)
</p></div><div class="reply_comment" id="reply_21"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/21/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_21"></p></div>

<div class="single_comment" id="comment_22"><div class="comments_left"><p><span class="posted_ago">6 MONTHS AGO</span><br/> <span class="email">Nicholas Mercer</span></p></div><div class="comments_right"><h6>Rails 2.0</h6><p>Sorry, posted wrong error message.....  DEPRECATION WARNING: You've called image_path with a source that doesn't include an extension. In Rails 2.0, that will not result in .png automatically being appended. So you should call image_path('/photo_admin/code_image/3.png') instead  See http://www.rubyonrails.org/deprecation for details. (called from image_tag at /rails/gtown/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb:188)</p></div><div class="reply_comment" id="reply_22"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/22/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_22"></p></div></div></div>

<div class="root_comment" id="comment_16"><div class="comments_left"><p><span class="posted_ago">6 MONTHS AGO</span><br/> <span class="email">Eric</span></p></div><div class="comments_right"><h6>Wonderful!</h6><p>This is just what I was looking for.  I didn't want to be limited by the popular attachment plugins out there.  Thanks for writing this up!</p></div><div class="reply_comment" id="reply_16"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/16/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_16"></p></div></div>

<div class="root_comment" id="comment_15"><div class="comments_left"><p><span class="posted_ago">6 MONTHS AGO</span><br/> <span class="email">Jorge Barbosa</span></p></div><div class="comments_right"><h6>Error</h6><p>When I not fill the field  image_file appear this error:
undefined method `original_filename'

And I put "validate_presence_of: image_file" in my "model"

What is a problem?

</p></div><div class="reply_comment" id="reply_15"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/15/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_15"></p></div></div>

<div class="root_comment" id="comment_14"><div class="comments_left"><p><span class="posted_ago">6 MONTHS AGO</span><br/> <span class="email">Jorge Barbosa</span></p></div><div class="comments_right"><h6>Help me please!</h6><p>How can I validate  the presence of image_file?</p></div><div class="reply_comment" id="reply_14"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/14/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_14"></p></div></div>

<div class="root_comment" id="comment_11"><div class="comments_left"><p><span class="posted_ago">6 MONTHS AGO</span><br/> <span class="email">Jorge Barbosa</span></p></div><div class="comments_right"><h6>Very nice!</h6><p>Thanks for your help!</p></div><div class="reply_comment" id="reply_11"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/11/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_11"></p></div></div>

<div class="root_comment" id="comment_10"><div class="comments_left"><p><span class="posted_ago">6 MONTHS AGO</span><br/> <span class="email">Graeme</span></p></div><div class="comments_right"><h6>Elegant</h6><p>Such an elegant and quick solution!!!  Thankyou</p></div><div class="reply_comment" id="reply_10"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/10/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_10"></p></div></div>

<div class="root_comment" id="comment_9"><div class="comments_left"><p><span class="posted_ago">6 MONTHS AGO</span><br/> <span class="email">Brad</span></p></div><div class="comments_right"><h6>Very Helpful</h6><p>Thanks, this is just what I needed!</p></div><div class="reply_comment" id="reply_9"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/9/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_9"></p></div>

<div class="single_comment" id="comment_41"><div class="comments_left"><p><span class="posted_ago">2 MONTHS AGO</span><br/> <span class="email">dsfdsf</span></p></div><div class="comments_right"><h6>reply to brad</h6><p>just to check</p></div><div class="reply_comment" id="reply_41"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/41/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_41"></p></div></div></div>

<div class="root_comment" id="comment_8"><div class="comments_left"><p><span class="posted_ago">6 MONTHS AGO</span><br/> <span class="email">Robert Green</span></p></div><div class="comments_right"><h6>Excellent article!</h6><p>Fantastic article.  I used this in conjunction with rmagick and lightbox to get a rich photo handling UI.  Worked very well!</p></div><div class="reply_comment" id="reply_8"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/8/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_8"></p></div></div>

<div class="root_comment" id="comment_2"><div class="comments_left"><p><span class="posted_ago">9 MONTHS AGO</span><br/> <span class="email">peter</span></p></div><div class="comments_right"><h6>upload image</h6><p>how do you limit the image size in your example?
I mean if you use attachment_fu or something else you can easily 
limit the image file size as well.
I am using the same idea as yours, but did not get the file size problem right.</p></div><div class="reply_comment" id="reply_2"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/2/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_2"></p></div>

<div class="single_comment" id="comment_40"><div class="comments_left"><p><span class="posted_ago">2 MONTHS AGO</span><br/> <span class="email">ssk</span></p></div><div class="comments_right"><h6>u r great</h6><p>just to chek</p></div><div class="reply_comment" id="reply_40"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/40/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_40"></p></div>

<div class="single_comment" id="comment_42"><div class="comments_left"><p><span class="posted_ago">2 MONTHS AGO</span><br/> <span class="email">dsfdsf</span></p></div><div class="comments_right"><h6>just to chek</h6><p>dsfdsfdsfdsfds</p></div><div class="reply_comment" id="reply_42"><p><a href="http://www.yahoo.com" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/42/child_comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Reply to this comment</a></div><div id="reply_form_42"></p></div></div></div></div>
	
	<div id="add_comment">
		<p><img alt="*" height="5" src="/images/f/bullets/pixels/diamond.png.?1201129166" width="5" /> <a href="#" onclick="new Ajax.Request('/ruby_on_rails/contents/2/comments/new', {asynchronous:true, evalScripts:true, method:'get'}); return false;">Add new comment</a></p>
	</div>

</div>

		</div>
		
		<div id="footer" class="clearfix">
			<div id="footer_man"><img alt="Footer_man" src="/images/f/backgrounds/footer_man.png.?1231935200" /></div>
			<img alt="Spiral_circle" src="/images/f/backgrounds/spiral_circle.png.?1231935089" />
		</div>
	
	</div>
</body>
</html>